/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * CadPaciente.java
 *
 * Created on 20/04/2012, 21:26:50
 */
package View;

import Dao.SistemaDAO;
import Modelo.Especialidade;
import Modelo.Paciente;
import Util.PAPUtil;

/**
 *
 * @author Marcelo Zanotelli
 */
public class CadPaciente extends javax.swing.JFrame {

    LocPaciente tp;
    PAPUtil papUtil = new PAPUtil();
    Paciente p;
    SistemaDAO sisDAO = new SistemaDAO();

    /**
     * Creates new form CadPaciente
     */
    public CadPaciente(LocPaciente p) {
        this.tp = p;
        this.p = new Paciente();

        initComponents();
        this.setExtendedState(javax.swing.JFrame.MAXIMIZED_BOTH); //Maximiza a tela

    }

    public CadPaciente(Paciente p) {
        initComponents();
        this.setExtendedState(javax.swing.JFrame.MAXIMIZED_BOTH); //Maximiza a tela

        this.p = p;

        mostra();

    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jLabel6 = new javax.swing.JLabel();
        jPnCadastroPaciente = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jTxtNomePaciente = new javax.swing.JTextField();
        jTxtCpf = new javax.swing.JFormattedTextField();
        jLabel3 = new javax.swing.JLabel();
        jBtCancelar = new javax.swing.JButton();
        jBtSalvar = new javax.swing.JButton();
        jTxtRg = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        jTxtEndereco = new javax.swing.JTextField();
        jTxtConvenioPaciente = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jTxtTelefone = new javax.swing.JFormattedTextField();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jTxtCodigoPaciente = new javax.swing.JTextField();
        jLbErro = new javax.swing.JLabel();
        jMbPrincipal = new javax.swing.JMenuBar();
        jMnAcoes = new javax.swing.JMenu();
        jMiCadastrar = new javax.swing.JMenuItem();
        jMiSair = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Cadastro de Paciente");
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosed(java.awt.event.WindowEvent evt) {
                formWindowClosed(evt);
            }
            public void windowClosing(java.awt.event.WindowEvent evt) {
                formWindowClosing(evt);
            }
        });

        jPanel1.setBackground(new java.awt.Color(255, 255, 255));
        jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanel1.setToolTipText("");
        jPanel1.setPreferredSize(new java.awt.Dimension(1804, 627));

        jLabel6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagens/Cruz.jpg"))); // NOI18N

        jPnCadastroPaciente.setBackground(new java.awt.Color(255, 255, 255));
        jPnCadastroPaciente.setBorder(javax.swing.BorderFactory.createTitledBorder("Paciente"));

        jLabel1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel1.setText("Nome:");

        jTxtNomePaciente.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTxtNomePacienteKeyTyped(evt);
            }
        });

        try {
            jTxtCpf.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("###.###.###-##")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }

        jLabel3.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel3.setText("CPF:");

        jBtCancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagens/X.png"))); // NOI18N
        jBtCancelar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBtCancelarActionPerformed(evt);
            }
        });

        jBtSalvar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagens/V.png"))); // NOI18N
        jBtSalvar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBtSalvarActionPerformed(evt);
            }
        });

        jTxtRg.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTxtRgKeyTyped(evt);
            }
        });

        jLabel5.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel5.setText("RG:");

        jTxtEndereco.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTxtEnderecoKeyTyped(evt);
            }
        });

        jTxtConvenioPaciente.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTxtConvenioPacienteKeyTyped(evt);
            }
        });

        jLabel4.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel4.setText("Telefone:");

        jLabel2.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel2.setText("Endereço:");

        try {
            jTxtTelefone.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("(##) ####.####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }

        jLabel7.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel7.setText("Convênio:");

        jLabel8.setText("Código:");

        jTxtCodigoPaciente.setBackground(new java.awt.Color(204, 204, 204));
        jTxtCodigoPaciente.setEditable(false);

        jLbErro.setText("Hospital Rest em Peace");

        javax.swing.GroupLayout jPnCadastroPacienteLayout = new javax.swing.GroupLayout(jPnCadastroPaciente);
        jPnCadastroPaciente.setLayout(jPnCadastroPacienteLayout);
        jPnCadastroPacienteLayout.setHorizontalGroup(
            jPnCadastroPacienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPnCadastroPacienteLayout.createSequentialGroup()
                .addGap(30, 30, 30)
                .addGroup(jPnCadastroPacienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPnCadastroPacienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(jLabel3)
                        .addComponent(jLabel1))
                    .addComponent(jLabel8))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPnCadastroPacienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jTxtNomePaciente)
                    .addComponent(jTxtCpf, javax.swing.GroupLayout.PREFERRED_SIZE, 371, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTxtCodigoPaciente, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(0, 0, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPnCadastroPacienteLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jBtCancelar, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(35, 35, 35)
                .addComponent(jBtSalvar, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(39, 39, 39))
            .addGroup(jPnCadastroPacienteLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPnCadastroPacienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPnCadastroPacienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addGroup(jPnCadastroPacienteLayout.createSequentialGroup()
                            .addComponent(jLabel2)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jTxtEndereco, javax.swing.GroupLayout.PREFERRED_SIZE, 372, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPnCadastroPacienteLayout.createSequentialGroup()
                            .addGroup(jPnCadastroPacienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(jLabel5)
                                .addComponent(jLabel7))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(jPnCadastroPacienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(jTxtRg, javax.swing.GroupLayout.DEFAULT_SIZE, 374, Short.MAX_VALUE)
                                .addComponent(jTxtConvenioPaciente)))
                        .addGroup(jPnCadastroPacienteLayout.createSequentialGroup()
                            .addComponent(jLabel4)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jTxtTelefone)))
                    .addComponent(jLbErro))
                .addContainerGap())
        );
        jPnCadastroPacienteLayout.setVerticalGroup(
            jPnCadastroPacienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPnCadastroPacienteLayout.createSequentialGroup()
                .addGap(13, 13, 13)
                .addGroup(jPnCadastroPacienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(jTxtCodigoPaciente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPnCadastroPacienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTxtNomePaciente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(18, 18, 18)
                .addGroup(jPnCadastroPacienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTxtCpf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3))
                .addGap(18, 18, 18)
                .addGroup(jPnCadastroPacienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTxtEndereco, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(18, 18, 18)
                .addGroup(jPnCadastroPacienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTxtRg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel5))
                .addGap(18, 18, 18)
                .addGroup(jPnCadastroPacienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTxtTelefone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(16, 16, 16)
                .addGroup(jPnCadastroPacienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTxtConvenioPaciente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(22, 22, 22)
                .addGroup(jPnCadastroPacienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jBtSalvar, 0, 0, Short.MAX_VALUE)
                    .addComponent(jBtCancelar, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(29, 29, 29)
                .addComponent(jLbErro))
        );

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(52, 52, 52)
                .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 147, Short.MAX_VALUE)
                .addComponent(jPnCadastroPaciente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(58, 58, 58))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(140, 140, 140)
                        .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 237, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(46, 46, 46)
                        .addComponent(jPnCadastroPaciente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(78, Short.MAX_VALUE))
        );

        jMnAcoes.setText("Ações");

        jMiCadastrar.setText("Cadastrar");
        jMiCadastrar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMiCadastrarActionPerformed(evt);
            }
        });
        jMnAcoes.add(jMiCadastrar);

        jMiSair.setText("Sair");
        jMiSair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMiSairActionPerformed(evt);
            }
        });
        jMnAcoes.add(jMiSair);

        jMbPrincipal.add(jMnAcoes);

        setJMenuBar(jMbPrincipal);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 905, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 522, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void formWindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosed
    }//GEN-LAST:event_formWindowClosed

    private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing
        
    }//GEN-LAST:event_formWindowClosing

    private void jTxtRgKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTxtRgKeyTyped
        if (!papUtil.somenteNumero(evt, '0')) {
            evt.consume();
        }
        if (!papUtil.tamanhoMaximo(10, jTxtRg.getText().length())) {
            evt.consume();
        }
    }//GEN-LAST:event_jTxtRgKeyTyped

    private void jTxtEnderecoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTxtEnderecoKeyTyped
        if (!papUtil.tamanhoMaximo(100, jTxtEndereco.getText().length())) {
            evt.consume();
        }
    }//GEN-LAST:event_jTxtEnderecoKeyTyped

    private void jTxtNomePacienteKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTxtNomePacienteKeyTyped
        if (!papUtil.tamanhoMaximo(80, jTxtNomePaciente.getText().length())) {
            evt.consume();
        }
    }//GEN-LAST:event_jTxtNomePacienteKeyTyped

    private void jTxtConvenioPacienteKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTxtConvenioPacienteKeyTyped
        if (!papUtil.tamanhoMaximo(30, jTxtConvenioPaciente.getText().length())) {
            evt.consume();
        }
    }//GEN-LAST:event_jTxtConvenioPacienteKeyTyped

    private void jBtSalvarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtSalvarActionPerformed
        if (!verificaBranco()) {
            return;
        }

        if (!jTxtCodigoPaciente.getText().trim().equals("")) {
            p.setIdpaciente(Integer.parseInt(jTxtCodigoPaciente.getText()));
        }
        
        p.setNome(jTxtNomePaciente.getText());
        p.setEndereco(jTxtEndereco.getText());
        p.setCpf(jTxtCpf.getText());
        p.setRg(jTxtRg.getText());
        p.setFone(jTxtTelefone.getText());
        p.setConvenio(jTxtConvenioPaciente.getText());
        
        sisDAO.addUpObjeto(p);
        
        this.dispose();

    }//GEN-LAST:event_jBtSalvarActionPerformed

    private void jBtCancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtCancelarActionPerformed
        // TODO add your handling code here:
        this.dispose();
    }//GEN-LAST:event_jBtCancelarActionPerformed

    private void jMiCadastrarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMiCadastrarActionPerformed
        if (!verificaBranco()) {
            return;
        }
    }//GEN-LAST:event_jMiCadastrarActionPerformed

    private void jMiSairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMiSairActionPerformed
        // TODO add your handling code here:
        this.dispose();
    }//GEN-LAST:event_jMiSairActionPerformed

    private boolean verificaBranco() {
        if (jTxtNomePaciente.getText().trim().equals("")) {
            jLbErro.setText("Campo nome do paciente é obrigatorio.");
            return false;
        }
        if (jTxtCpf.getText().equals("   .   .   -  ")) {
            jLbErro.setText("Campo CPF é obrigatorio.");
            return false;
        }
        if (jTxtEndereco.getText().trim().equals("")) {
            jLbErro.setText("Campo endereço é obrigatorio.");
            return false;
        }
        if (jTxtRg.getText().trim().equals("")) {
            jLbErro.setText("Campo RG é obrigatorio.");
            return false;
        }
        if (jTxtTelefone.getText().equals("(  )     .    ")) {
            jLbErro.setText("Campo Telefone é obrigatorio.");
            return false;
        }
        if (jTxtConvenioPaciente.getText().trim().equals("")) {
            jLbErro.setText("Campo convênio é obrigatorio.");
            return false;
        }

        return true;
    }

    private void mostra() {
        jTxtNomePaciente.setText(p.getNome());
        jTxtCpf.setText(p.getCpf().toString());
        jTxtEndereco.setText(p.getEndereco());
        jTxtTelefone.setText(p.getFone());

        jTxtRg.setText(p.getRg());
        jTxtConvenioPaciente.setText(p.getConvenio());
        jTxtCodigoPaciente.setText(String.valueOf(p.getIdpaciente()));

    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jBtCancelar;
    private javax.swing.JButton jBtSalvar;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLbErro;
    private javax.swing.JMenuBar jMbPrincipal;
    private javax.swing.JMenuItem jMiCadastrar;
    private javax.swing.JMenuItem jMiSair;
    private javax.swing.JMenu jMnAcoes;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPnCadastroPaciente;
    private javax.swing.JTextField jTxtCodigoPaciente;
    private javax.swing.JTextField jTxtConvenioPaciente;
    private javax.swing.JFormattedTextField jTxtCpf;
    private javax.swing.JTextField jTxtEndereco;
    private javax.swing.JTextField jTxtNomePaciente;
    private javax.swing.JTextField jTxtRg;
    private javax.swing.JFormattedTextField jTxtTelefone;
    // End of variables declaration//GEN-END:variables
}
